import axios from 'axios';

let instance = axios.create({
  baseURL: 'http://192.168.6.134:5000',
  timeout: 20000, // 超时设置为20秒
  headers: {
    'Content-Type': 'application/json',
  },
});


export function getRange() {
  return instance({
    url: 'http://192.168.6.134:5000/visitor/get_time_range',
    method: 'get',
  })
}

export function getdata(data,content,category) {
  return instance({
    url: "http://192.168.6.134:5000/visitor"+content+category,
    method: 'post',
    data: data,
  })
}
